package com.opgea.token.service;

import java.util.ArrayList;
import java.util.List;

import com.opgea.token.domain.model.Authorization;
import com.opgea.token.domain.model.Page;
import com.opgea.token.domain.model.StringBinding;

public class AccessService {

    private static final String REDIRECT = "?faces-redirect=true";

    public static List<Page> getPageList() {
	List<Page> pageList = new ArrayList<Page>();
	pageList.add(new Page(1, "/company/list.xhtml" + REDIRECT,
		"Company Details"));
	pageList.add(new Page(2, "/address/list.xhtml" + REDIRECT,
		"Company Address"));
	pageList.add(new Page(3, "/destination/list.xhtml" + REDIRECT,
		"Destination"));
	pageList.add(new Page(4, "/employee/list.xhtml" + REDIRECT,
		"Employee"));
	pageList.add(new Page(4, "/reception/list.xhtml" + REDIRECT,
		"Reception"));
	return pageList;
    }

    public static List<StringBinding> getActionList(int pageId,
	    int accessLevelId) {
	List<StringBinding> menuList = new ArrayList<StringBinding>();
	menuList.add(new StringBinding("new.xhtml" + REDIRECT, "New"));
	menuList.add(new StringBinding("list.xhtml" + REDIRECT, "View All"));
	return menuList;
    }

    public static List<Authorization> getAllAuthorizations(int pageId,
	    int accessLevelId) {
	return null;
    }
}
